home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bupv100a.zip / BDEMOUT1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-09-06  |  4KB  |  77 lines

  1. program DEMO_PROGRAM_Output_01;
  2. { Demonstrations Of Some Input/Output Routines }
  3. { (C)opyright 1991, Cyber-Dyne Software. All Rights Reserved! }
  4.  
  5. Uses Crt, Dos, basFAST;
  6.  
  7. var
  8.   Window : WindowOBJ;
  9.   Count : byte;
  10.  
  11. begin
  12.   with Screen do begin
  13.     Init; { Initialize The ScreenOBJ Object }
  14.     ClearScreen( ColorAttr( Black, Blue ), ' ' ); { Clear The Screen }
  15.     with Window do begin
  16.       Init; { Initialize The WindowOBJ Object }
  17.       ShadowExplodeBox( 5, 2, 76, 7, ColorAttr( Black, Cyan ), 2 );
  18.     end; { LOOP: Window }
  19.     SetColors( ColorAttr( White, Cyan ), ColorAttr( Black, Cyan ));
  20.     WriteCenter( 3, ColorAttr( White, Cyan ), 'The Basner Utilities v1.0a For Turbo Pascal v6.0' );
  21.     WriteCenter( 4, ColorAttr( White, Cyan ), '(C)opyright 1991, Cyber-Dyne Software. All Rights Reserved.' );
  22.     WriteCenter( 6, ColorAttr( Blue, Cyan ), 'PROGRAM: BDEMOUT1 - ~Demonstrations Of Output Routines.~' );
  23.     with Window do begin
  24.       FillBox( 2, 15, 79, 24, ColorAttr( Black, Red ), 3 );
  25.     end; { LOOP: Window }
  26.     SetColors( ColorAttr( Yellow, Red ), ColorAttr( White, Red ));
  27.     WriteAt( 19, 16, ColorAttr( Yellow, Red ), 'This Is ~WRITEAT( 19, 16, {COLOR}, {TEXT} )~' );
  28.     WriteCenter( 17, ColorAttr( Yellow, Red ), 'This Is ~WRITECENTER( 17, {COLOR}, {TEXT} )~' );
  29.     WriteBetween( 3, 78, 18, ColorAttr( Yellow, Red ), 'This Is ~WRITEBETWEEN( 3, 78, 18, {COLOR}, {TEXT} )~' );
  30.     WritePlain( 24, 19, 'This Is ~WRITEPLAIN( 24, 19, {TEXT} )~' );
  31.     WriteBack( 18, 20, ColorAttr( Yellow, Red ), 'This Is ~WRITEBACK( 18, 20, {COLOR}, {TEXT} )~' );
  32.     with Window do begin
  33.       ShadowBox( 2, 2, 6, 18, ColorAttr( Black, Red ), 2 );
  34.     end; { LOOP: Window }
  35.     WriteVertical( 4, 4, ColorAttr( White, Red ), 'WRITEVERTICAL' );
  36.     SaveScreen( 1 ); { Save Current Screen Into Element 1 }
  37.     with Window do begin
  38.       ShadowExplodeBox( 5, 5, 76, 15, ColorAttr( Black, Cyan ), 2 );
  39.       WriteCenter( 6, ColorAttr( White, Cyan ), ' * Now For Some FANCY Window Routines! * ' );
  40.       delay( 2000 );
  41.       ClearScreen( ColorAttr( White, Black ), ' ' );
  42.       Box( 3, 2, 78, 24, ColorAttr( Black, Cyan ), 1 );
  43.       WriteCenter( 4, ColorAttr( White, Black ), 'BOX( 3, 2, 78, 24, ColorAttrr( White, Cyan ), 1 )' );
  44.       WriteCenter( 5, ColorAttr( Yellow, Black ), 'Type 1 - No Border Character' );
  45.       SaveScreen( 2 );
  46.       delay( 2000 );
  47.       FillBox( 5, 3, 76, 23, ColorAttr( Black, Red ), 2 );
  48.       WriteCenter( 5, ColorAttr( Yellow, Red ), 'FILLBOX( 5, 3, 76, 23, ColorAttr( Black, Red ), 2 )' );
  49.       WriteCenter( 6, ColorAttr( White, Red ), 'Type 2 - Single Line Box' );
  50.       SaveScreen( 3 );
  51.       delay( 2000 );
  52.       ShadowBox( 7, 4, 74, 22, ColorAttr( LightBlue, Blue ), 3 );
  53.       WriteCenter( 6, ColorAttr( Yellow, Blue ), 'SHADOWBOX( 7, 4, 74, 22, ColorAttr( LightBlue, Blue ), 3 )' );
  54.       WriteCenter( 7, ColorAttr( White, Blue ), 'Type 3 - Double Line Box' );
  55.       SaveScreen( 4 );
  56.       delay( 2000 );
  57.       ExplodeBox( 9, 5, 72, 21, ColorAttr( Black, Green ), 4 );
  58.       WriteCenter( 7, ColorAttr( White, Green ), 'EXPLODEBOX( 9, 5, 72, 21, ColorAttr( Black, Green ), 5 )' );
  59.       WriteCenter( 8, ColorAttr( Yellow, Green ), 'Type 4 - Double Line Vertical, Single Line Horizontal' );
  60.       SaveScreen( 5 );
  61.       delay( 2000 );
  62.       ShadowExplodeBox( 8, 6, 73, 12, ColorAttr( Black, Red ), 5 );
  63.       WriteCenter( 8, ColorAttr( White, Red ), 'SHADOWEXPLODEBOX( 8, 6, 76, 12, ColorAttr( Black, Red ), 5 )' );
  64.       WriteCenter( 9, ColorAttr( Yellow, Red ), 'Type 5 - Single Line Vertical, Double Line Horizontal' );
  65.       delay( 2000 );
  66.       for Count := 5 downto 2 do begin
  67.         WriteCenter( Count+6, ColorAttr( Yellow, Black ), ' Now Restoring Previous Window! ' );
  68.         delay( 2000 );
  69.         RestoreScreen( Count );
  70.       end; { LOOP: Count }
  71.       WriteCenter( 7, ColorAttr( Yellow, Black ), 'Now Restoring The Original Screen!' );
  72.       delay( 2000 );
  73.       RestoreScreen( 1 );
  74.     end; { LOOP: Window }
  75.   end; { LOOP: Screen }
  76.   delay( 2000 ); { Let The User See How Nice This Program Is! :-) }
  77. end. { PROGRAM: DEMO_PROGRAM_Output_01 }